<?php
include_once dirname(__FILE__).'/Month.class.php';
include_once dirname(__FILE__).'/Calendar.class.php';

class Day {
	public $day;
	public $month;
	public $year;
	
	public $week;
	public $week_day;
	
	public $data;
	
	function __construct($day, $month, $year, $week = null, $week_day = null) {
		$this->day = ($day == null)?date("j"):$day;
		$this->month = ($month == null)?date("n"):$month;
		$this->year = ($year == null)?date("Y"):$year;
		
		$day_s = "$this->year-$this->month-$this->day";
		
		$this->week = ($week == null)?Calendar::getDate("W",$day_s):$week;
		$this->week_day = ($week_day === null)?Calendar::getDate("w",$day_s):$week_day;
	}
}
?>